package Task2;

public class Item {
	   private int value;
	   private Item next;
	   public Item(int i) {
		   next = null;
	      value = i;
	   }
	   public Item(int val, Item next2) {
		value = val;
		next = next2;
	}
	public boolean hasNext(){
		   if (next==null)
			   return false;
		   return true;
		   
	   }
	   
	   public Item next(){
		   return next;
	   }
	   
	   public int value(){
		   return value;
	   }
	   
	   public void setNext(Item _next){
		   next = _next;
	   }
	   
	}